Skip to content

style(workflow): set sensible RetryPolicy defaults and add max_attempts (#836) - #1386

Open
atharv20s wants to merge 1 commit into
dapr:mainfrom
atharv20s:style/workflow-retry-policy-defaults
Open

atharv20s wants to merge 1 commit into
dapr:mainfrom
atharv20s:style/workflow-retry-policy-defaults

Conversation

@atharv20s

@atharv20s atharv20s commented Nov 28, 2026 •

Copy link
Copy Markdown

Description

Updates RetryPolicy in dapr/ext/workflow/retry_policy.py with sensible defaults and clearer documentation:

  • Sets default values: first_retry_interval=timedelta(seconds=1), max_attempts=1, backoff_coefficient=1.0, max_retry_interval=timedelta(seconds=60), and retry_timeout=None.
  • Adds max_attempts parameter and @property while keeping max_number_of_attempts as a supported deprecated alias.
  • Clarifies docstrings that max_attempts represents total attempts (including the initial attempt).
  • Adds unit tests in tests/ext/test_retry_policy.py.

Fixes #836

Checklist

  • Code compiles correctly
  • Created/updated unit tests

@atharv20s
atharv20s requested review from a team as code owners November 28, 2026 08:51
@CasperGN CasperGN self-assigned this Nov 28, 2026
…ts (dapr#836)

Signed-off-by: atharv20s <shuklaatharv2005@gmail.com>
@atharv20s
atharv20s force-pushed the style/workflow-retry-policy-defaults branch from 35e341f to 4d488e5 Compare November 28, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

style: clarify workflow activity retry fields/defaults

2 participants